#ifndef DEPARTMENTCHANGEVIEW_H
#define DEPARTMENTCHANGEVIEW_H

#include <QWidget>
#include <QTableWidget>
#include <QPushButton>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
#include <QHeaderView>

class AdminManager;

class DepartmentChangeView : public QWidget
{
    Q_OBJECT
public:
    explicit DepartmentChangeView(QWidget *parent = nullptr);
    ~DepartmentChangeView();

    // 设置AdminManager
    void setAdminManager(AdminManager *manager);

    // 刷新部门调换申请数据
    void refreshTransferRequests();

private slots:
    // 同意申请按钮点击事件
    void onApproveButtonClicked();

    // 拒绝申请按钮点击事件
    void onRejectButtonClicked();

private:
    // 初始化UI
    void initUI();

    // AdminManager指针
    AdminManager *m_adminManager;

    // UI组件
    QTableWidget *m_tableWidget;
    QPushButton *m_approveButton;
    QPushButton *m_rejectButton;
    QLabel *m_titleLabel;
};

#endif // DEPARTMENTCHANGEVIEW_H
